@import "~@/style/variables.scss";

$themes: (
  theme-light: (
    mainColor: $base-blue-background,
    bgColor: #ffffff,
    textColor: #333333,
    lightColor: $base-blue-background,
    subTextColor: #666666,
    ThirdTextColor: #999999,
    titleColor: $base-blue-background,
    borderColor: #e5e5e5,
    linearbackground:
      linear-gradient(
        180deg,
        #b9d6ff 0%,
        rgba(179, 219, 255, 0.2) 8%,
        rgba(255, 255, 255, 0.1) 18%
      ),
  ),
  theme-dark: (
    mainColor: #106ece,
    bgColor: #023074,
    textColor: #ffffff,
    lightColor: #5dadff,
    subTextColor: #c5e9ff,
    ThirdTextColor: #c5e9ff,
    titleColor: #ffffff,
    borderColor: #144fae,
    linearbackground:
      linear-gradient(
        180deg,
        rgba(0, 158, 255, 0.5) 0%,
        rgba(0, 158, 255, 0) 10%
      ),
  ),
);

// $deep-color: #092F6E;
// $main-color: #009EFF;
// $text-color: #FFFFFF;
// $border-color: #1950A1;

$currentTheme: default;

@mixin theme() {
  @each $theme, $value in $themes {
    $currentTheme: $theme !global;

    [data-theme="#{$theme}"] & {
      @content;
    }
  }
}

@function getTheme($theme) {
  $themeMap: map-get($themes, $currentTheme);
  @return map-get($themeMap, $theme);
}

// 定义一个mixin来生成带有透明度的背景色
@mixin background-with-opacity($color, $opacity) {
  $opacity: 0.5 !default;
  background-color: rgba($color, $opacity);
}
